from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

from src.homepage import HomePage
from src.imagepage import *
from src.mailpage import EmailPage, IncommingEmailHandler
from src.channelpage import *
from src.queuepage import QueuePage, QueueProcessor

application = webapp.WSGIApplication([('/home|/', HomePage),
                                      ('/channel', ChannelPage),
                                      ('/channel/handler', ChannelMessageHandler),
                                      ('/images', ImagesPage),
                                      ('/images/blobstore', ImageBlobUploadHandler),
                                      ('/images/processor', ImagesProcessor),
                                      ('/mail', EmailPage),
                                      IncommingEmailHandler.mapping(),
                                      ('/queue', QueuePage),
                                      ('/queue/sendemail', QueueProcessor)], debug=True)

if __name__ == "__main__": 
    run_wsgi_app(application)
